find the index of the substring in python